<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - 外卖APP</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css">
    <style>
        :root {
            --primary-color: #2563eb;
            --secondary-color: #3b82f6;
            --accent-color: #f59e0b;
            --text-primary: #1f2937;
            --text-secondary: #4b5563;
            --background-light: #f8fafc;
        }

        body {
            margin: 0;
            padding: 0;
            background: var(--background-light);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .phone-container {
            width: 390px;
            height: 844px;
            margin: 20px auto;
            background: white;
            position: relative;
            overflow: hidden;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            border-radius: 40px;
        }

        .content {
            height: calc(100% - 70px);
            overflow-y: auto;
            background: var(--background-light);
        }

        .content::-webkit-scrollbar {
            width: 0;
        }

        .bottom-nav {
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 70px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 12px;
            transition: all 0.3s ease;
            padding: 8px 12px;
            border-radius: 12px;
        }

        .nav-item:hover {
            background: rgba(37, 99, 235, 0.05);
        }

        .nav-item.active {
            color: var(--primary-color);
            font-weight: 500;
        }

        .nav-item i {
            font-size: 22px;
            margin-bottom: 4px;
            transition: transform 0.2s ease;
        }

        .nav-item:hover i {
            transform: translateY(-2px);
        }

        .header {
            padding: 15px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .search-bar {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px;
            display: flex;
            align-items: center;
            padding: 10px 15px;
            gap: 10px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(5px);
        }

        .search-bar i {
            color: var(--text-secondary);
        }

        .search-input {
            border: none;
            outline: none;
            flex: 1;
            font-size: 14px;
            background: transparent;
        }

        .search-input::placeholder {
            color: var(--text-secondary);
            opacity: 0.7;
        }

        .banner-swiper {
            padding: 20px 15px;
        }

        .banner-slide {
            height: 160px;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            transform: scale(0.98);
            transition: transform 0.3s ease;
        }

        .swiper-slide-active .banner-slide {
            transform: scale(1);
        }

        .banner-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .category-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            padding: 20px 15px;
            gap: 20px;
            background: white;
            border-radius: 24px;
            margin: 0 15px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        }

        .category-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            color: var(--text-primary);
            transition: transform 0.2s ease;
        }

        .category-item:hover {
            transform: translateY(-2px);
        }

        .category-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, #e0f2fe, #dbeafe);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 8px;
            box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
            transition: all 0.3s ease;
        }

        .category-item:hover .category-icon {
            background: linear-gradient(135deg, #bfdbfe, #93c5fd);
            transform: scale(1.05);
        }

        .category-icon i {
            color: var(--primary-color);
            font-size: 24px;
        }

        .category-name {
            font-size: 12px;
            font-weight: 500;
        }

        .section-title {
            padding: 25px 20px 15px;
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
            background: white;
            margin: 15px 0 0 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .restaurant-list {
            background: white;
            padding: 10px 0;
        }

        .restaurant-item {
            display: flex;
            padding: 20px;
            text-decoration: none;
            color: inherit;
            transition: all 0.3s ease;
            position: relative;
        }

        .restaurant-item:hover {
            background: var(--background-light);
        }

        .restaurant-item::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 20px;
            right: 20px;
            height: 1px;
            background: rgba(0, 0, 0, 0.05);
        }

        .restaurant-img {
            width: 90px;
            height: 90px;
            border-radius: 12px;
            margin-right: 20px;
            object-fit: cover;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .restaurant-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .restaurant-name {
            font-size: 17px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .restaurant-rating {
            color: var(--accent-color);
            font-size: 13px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 2px;
        }

        .restaurant-rating span {
            margin-left: 5px;
            font-weight: 500;
        }

        .restaurant-misc {
            color: var(--text-secondary);
            font-size: 13px;
            display: flex;
            gap: 15px;
        }

        .restaurant-misc span {
            position: relative;
        }

        .restaurant-misc span:not(:last-child)::after {
            content: '';
            position: absolute;
            right: -8px;
            top: 50%;
            width: 1px;
            height: 12px;
            background: rgba(0, 0, 0, 0.1);
            transform: translateY(-50%);
        }

        .swiper-pagination-bullet {
            width: 6px;
            height: 6px;
            background: rgba(255, 255, 255, 0.8);
            opacity: 0.5;
        }

        .swiper-pagination-bullet-active {
            opacity: 1;
            background: white;
        }
    </style>
</head>
<body>
    <div class="phone-container">
        <div class="content">
            <!-- 顶部搜索栏 -->
            <div class="header">
                <div class="search-bar">
                    <i class="bi bi-search"></i>
                    <input type="text" class="search-input" placeholder="想吃什么？搜索商家、美食">
                </div>
            </div>

            <!-- 轮播广告 -->
            <div class="swiper banner-swiper">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <div class="banner-slide">
                            <img src="https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=800&auto=format&fit=crop" alt="美食广告">
                        </div>
                    </div>
                    <div class="swiper-slide">
                        <div class="banner-slide">
                            <img src="https://images.unsplash.com/photo-1543353071-873f17a7a088?w=800&auto=format&fit=crop" alt="优惠广告">
                        </div>
                    </div>
                </div>
                <div class="swiper-pagination"></div>
            </div>

            <!-- 功能分类 -->
            <div class="category-grid">
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-cup-hot"></i>
                    </div>
                    <span class="category-name">美食</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-shop"></i>
                    </div>
                    <span class="category-name">超市</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-basket"></i>
                    </div>
                    <span class="category-name">水果</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-gift"></i>
                    </div>
                    <span class="category-name">鲜花</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-prescription2"></i>
                    </div>
                    <span class="category-name">药店</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-egg-fried"></i>
                    </div>
                    <span class="category-name">早餐</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-cup"></i>
                    </div>
                    <span class="category-name">奶茶</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-clock"></i>
                    </div>
                    <span class="category-name">跑腿</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-ticket-perforated"></i>
                    </div>
                    <span class="category-name">优惠</span>
                </a>
                <a href="#" class="category-item">
                    <div class="category-icon">
                        <i class="bi bi-grid"></i>
                    </div>
                    <span class="category-name">更多</span>
                </a>
            </div>

            <!-- 推荐商家 -->
            <h2 class="section-title">推荐商家</h2>
            <div class="restaurant-list">
                <a href="#" class="restaurant-item">
                    <img src="https://images.unsplash.com/photo-1552566626-52f8b828add9?w=160&h=160&auto=format&fit=crop" alt="商家图片" class="restaurant-img">
                    <div class="restaurant-info">
                        <div class="restaurant-name">品味小厨</div>
                        <div class="restaurant-rating">
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-half"></i>
                            <span>4.8</span>
                        </div>
                        <div class="restaurant-misc">
                            <span>¥20起送</span>
                            <span>配送费¥3</span>
                            <span>30分钟</span>
                        </div>
                    </div>
                </a>
                <a href="#" class="restaurant-item">
                    <img src="https://images.unsplash.com/photo-1571091718767-18b5b1457add?w=160&h=160&auto=format&fit=crop" alt="商家图片" class="restaurant-img">
                    <div class="restaurant-info">
                        <div class="restaurant-name">川味小馆</div>
                        <div class="restaurant-rating">
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star-fill"></i>
                            <i class="bi bi-star"></i>
                            <span>4.0</span>
                        </div>
                        <div class="restaurant-misc">
                            <span>¥25起送</span>
                            <span>配送费¥4</span>
                            <span>35分钟</span>
                        </div>
                    </div>
                </a>
            </div>
        </div>

        <!-- 底部导航 -->
        <div class="bottom-nav">
            <a href="index.html" class="nav-item active">
                <i class="bi bi-house"></i>
                <span>首页</span>
            </a>
            <a href="order.html" class="nav-item">
                <i class="bi bi-receipt"></i>
                <span>订单</span>
            </a>
            <a href="vip.html" class="nav-item">
                <i class="bi bi-star"></i>
                <span>会员</span>
            </a>
            <a href="user.html" class="nav-item">
                <i class="bi bi-person"></i>
                <span>我的</span>
            </a>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.js"></script>
    <script>
        new Swiper('.banner-swiper', {
            loop: true,
            autoplay: {
                delay: 3000,
                disableOnInteraction: false,
            },
            pagination: {
                el: '.swiper-pagination',
            },
            effect: 'fade',
            fadeEffect: {
                crossFade: true
            }
        });
    </script>
</body>
</html> 